<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name:'App',
  mounted() {
    window.addEventListener('unload',this.saveState)
  },
  methods:{
    saveState(){
      sessionStorage.userState = JSON.stringify(this.$store.state.user);
    }
  }

}
</script>

<style>
#app {
  font-family: Helvetica, sans-serif;
  text-align: center;
}
</style>
